﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace PaperMaster.Utilities
{
    /// <summary>
    /// 程序中可能用到的各种字符串名
    /// </summary>
    public enum StringType
    {
        PieceDataPath,
        CardDataPath,
        CardPrefabPath,
        PiecePrefabPath,
    }
    /// <summary>
    /// 该类包含各类字符串
    /// </summary>
    public class Strings
    {

        static bool _inited = false;
        static Dictionary<StringType, string> _strings;

        public static string GetString(StringType stringName)
        {
            if (!_inited)
            {
                _inited = true;
                LoadStrings();
            }
            return _strings[stringName];
        }
        static void LoadStrings()
        {
            _strings = new Dictionary<StringType, string>();

            _strings.Add(StringType.PieceDataPath, Application.dataPath + "/Resources/JsonData/PieceData.json");
            _strings.Add(StringType.CardDataPath, Application.dataPath + "/Resources/JsonData/CardData.json");
            _strings.Add(StringType.CardPrefabPath, "Cards/");
            _strings.Add(StringType.PiecePrefabPath, "Pieces/");
        }
    }
}
